import * as url from '../constants/api';
import req from '@/utils/request';


export function getDepartment () {
    return req({
        method: 'GET',
        url: url.DEPARTMENT,
    });
}

// 获取员工的简单列表
export function getEmployeeSimple () {
    return req({
        method: 'GET',
        url: url.EMPLOYEES,
    });
}

// 新增
export function addDepartment (params) {
    return req({
        method: 'POST',
        url: url.DEPARTMENT,
        data: params
    });
}
// 修改
export function editDepartment (id, data) {
    return req({
        method: 'PUT',
        url: url.ADDDEPARTMENT + id,
        data
    });
}
// 删除
export function delDepartment (id) {
    return req({
        method: 'GET',
        url: url.COMPANY + id,
    });
}
